package service

import (
	sqlc "bgs/db/sqlc"
	"context"
)

func (s *OrderServiceImp) ListOrderBonusPtrsByOrderID(ctx context.Context, q *sqlc.Queries, orderID int64) (orderBonusPtrs []*sqlc.OrderBonuse, err error) {
	orderBonuses, err := q.ListNormalOrderBonusesByOrderID(ctx, orderID)
	if err != nil {
		return
	}
	orderBonusPtrs = s.MapOrderBonusEntityToPtr(orderBonuses)
	return
}
